<%@ page contentType="text/html;charset=UTF-8" trimDirectiveWhitespaces="true"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<c:set var="extLibs" value="validate"/>
<sys:header title="会员缴费记录管理 - ${memberFee.isNewRecord ? '新增' : '编辑'}会员缴费记录" extLibs="${extLibs}"/>
<div class="portlet box ${boxStyleColor} autoHeight">
	<div class="portlet-title">
		<div class="caption"><i class="fa fa-coffee"></i>${memberFee.isNewRecord ? '新增' : '编辑'}会员缴费记录</div>
	</div>
	<div class="portlet-body form">
		<form:form id="inputForm" modelAttribute="memberFee" action="${ctx}/mih/memberFee/save" method="post" class="form-horizontal">
			<div class="form-body">
				<h4 class="form-section">基本信息</h4>
				<form:hidden path="id"/>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								会员编码：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<form:input path="memberCode" htmlEscape="false" maxlength="64" class="form-control"/>
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								会员姓名：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<form:input path="memberName" htmlEscape="false" maxlength="64" class="form-control"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								所在单位：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<sys:treeselect id="office" name="officeCode" value="${memberFee.officeCode}" labelName="officeName" labelValue="${memberFee.officeName}"
									title="单位" url="/sys/office/treeData?type=2" cssClass="" allowClear="true" notAllowSelectParent="true"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								开始年月：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<form:input path="beginYearMonth" htmlEscape="false" maxlength="6" class="form-control"/>
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								结束年月：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<form:input path="endYearMonth" htmlEscape="false" maxlength="6" class="form-control"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								期数：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<form:input path="periods" htmlEscape="false" maxlength="11" class="form-control digits"/>
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								报销比例：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<form:input path="calcRatio" htmlEscape="false" class="form-control number"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								缴费状态：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<form:radiobuttons  path="payStatus" items="${fns:getDictList('pay_status')}" itemLabel="label" itemValue="value" 
											htmlEscape="false"  />
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								中断年月：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<form:input path="breakYearMonth" htmlEscape="false" maxlength="255" class="form-control"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								已缴金额：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<form:input path="amount" htmlEscape="false" class="form-control number"/>
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								备注信息：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<form:input path="remrks" htmlEscape="false" maxlength="255" class="form-control"/>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="form-actions fluid">
				<div class="row">
					<div class="col-xs-12">
						<div class="col-sm-offset-2 col-sm-10">
							<shiro:hasPermission name="mih:memberFee:edit">
								<button id="btnSubmit" type="submit" class="btn btn-primary"><i class="fa fa-check"></i> 保 存</button>&nbsp;
							</shiro:hasPermission>
							<button id="btnCancel" type="button" class="btn default" onclick="closeCurrentTabPage('${param.parentTabPageId}')"><i class="fa fa-reply-all"></i> 关 闭</button>
						</div>
					</div>
				</div>
			</div>
		</form:form>
	</div>
</div>
<sys:footer extLibs="${extLibs}"/>
<script type="text/javascript">
	$("#inputForm").validate({
		submitHandler: function(form){
			ajaxSubmitForm($(form), function(data){
				showMessage(data.message);
				if(data.result == Global.TRUE){
					closeCurrentTabPage('${param.parentTabPageId}', function(contents, contentWindow){
						contentWindow.page();
					});
				}
			}, "json");
	    }
	});
</script>